package com.iss.card.common;

import android.app.Activity;
import android.content.Context;
import android.view.Display;

public class ApplicationManager {

	public static final boolean DEBUG = true;

	/**
	 * 锟斤拷幕锟斤拷锟�
	 */
	public static int SCREEN_WIDTH;

	/**
	 * 锟斤拷幕锟竭讹拷
	 */
	public static int SCREEN_HEIGHT;

	/**
	 * 锟斤拷取锟斤拷幕锟斤拷锟�
	 * 
	 * @param c
	 * @return Integer,锟斤拷幕锟斤拷锟�
	 */
	public static int getScreenWidth(Context c) {
		Display d = ((Activity) c).getWindowManager().getDefaultDisplay();
		return d.getWidth();
	}

	/**
	 * 锟斤拷取锟斤拷幕锟竭讹拷
	 * 
	 * @param c
	 * @return Integer,锟斤拷幕锟竭讹拷
	 */
	public static int getScreenHeight(Context c) {
		Display d = ((Activity) c).getWindowManager().getDefaultDisplay();
		return d.getHeight();
	}

	public static final String KEY_MYCARD_BRIEF_CARD = "KEY_MYCARD_BRIEF_CARD";
	/**
	 * 锟斤拷锟斤拷图片锟斤拷锟斤拷锟阶狪ntent锟斤拷KEY值
	 */
	public static final String KEY_PUT_EXTRA_BY_PRODUCT_IMAGE = "key_product_image";
	/** key for selected store id. */
	public static final String KEY_PUT_EXTRA_SELECTED_STORE_ID = "KEY_PUT_EXTRA_SELECTED_STORE_ID";
	/** key for default product id. */
	public static final String KEY_PUT_EXTRA_DEFAULT_PRODUCT_ID = "KEY_PUT_EXTRA_DEFAULT_PRODUCT_ID";

	/**
	 * 锟揭的匡拷锟斤拷锟斤拷锟斤拷转Intent锟斤拷KEY值
	 */
	public static final String KEY_PUT_EXTRA_BY_MY_CARD = "key_my_card";

	/**
	 * 锟斤拷围锟斤拷锟教碉拷锟斤拷锟阶狪ntent锟斤拷KEY值
	 */
	public static final String KEY_PUT_EXTRA_BY_NEAR_STORE = "key_near_store";

	/** it is used to store map view mode. */
	public static final String KEY_GMAP_MAP_VIEW_MODE = "KEY_GMAP_MAP_VIEW_MODE";

	/** it is used to store extra data while go to google map view. */
	public static final String KEY_GMAP_POSITION_DATA = "KEY_GMAP_POSITION_DATA";

	/**
	 * 锟剿伙拷锟斤拷录锟斤拷志
	 */
	public static boolean accountIsLogin = false;

	/**
	 * 锟剿伙拷ID
	 */
	public static long accountId = -1;

	/**
	 * 锟剿伙拷锟界话
	 */
	public static String accountPhoneNum = "";

	/**
	 * 图墙图片一锟斤拷锟斤拷示锟斤拷锟斤拷锟斤拷
	 */
	public static final int BUSINESSES_PULL_PICTURES_NUMBER = 9;

	/**
	 * 图墙图片之锟斤拷募锟斤拷锟斤拷锟斤拷
	 */
	public static final int BUSINESSES_DISTANCE_BETWEEN_IMAGES = 10;

	/**
	 * interval value between rows in store list page.
	 */
	public static final int BUSINESSES_DISTANCE_BETWEEN_IMAGES_IN_STORE = 0;
	/**
	 * displayed row number in store list page.
	 */
	public static final int BUSINESSES_SCREEN_DISPLAY_NUMBER_OF_ROWS_IN_STORE = 1;

	/**
	 * 图墙图片一锟斤拷幕锟斤拷示锟斤拷锟斤拷锟斤拷
	 */
	public static final int BUSINESSES_SCREEN_DISPLAY_NUMBER_OF_ROWS = 3;

	/**
	 * 锟斤拷锟斤拷key
	 */
	public static final String INTENT_KEY = "intent_key";

	/**
	 * 锟斤拷锟斤拷锟斤拷锟斤拷intent
	 */
	public static final int INTENT_FRAGMENT_STORE_DETAIL = 1;

	/**
	 * 锟斤拷锟斤拷intent
	 */
	public static final int INTENT_FRAGMENT_MY_CARD = 2;

	/**
	 * 摇一摇intent
	 */
	public static final int INTENT_FRAGMENT_SHAKE = 3;

	/**
	 * 锟斤拷锟斤拷锟絠ntent
	 */
	public static final int INTENT_FRAGMENT_FEED_BACK = 4;

	/**
	 * 锟斤拷锟斤拷锟斤拷锟斤拷intent
	 */
	public static final int INTENT_FRAGMENT_ABOUT_US = 5;

	/**
	 * 锟斤拷围锟斤拷锟斤拷intent
	 */
	public static final int INTENT_FRAGMENT_NEAR_STORE = 6;

	/**
	 * intent for containerActivity change fragment to log in
	 */
	public static final int INTENT_FRAMENT_LOG_IN = 8;

	/**
	 * intent for first use indirection
	 */
	public static final int INTENT_FRAGMENT_FIRES_USE = 9;
	/**
	 * intent for change password
	 */
	public static final int INTENT_FRAGMENT_CHANGE_PASSWORD = 10;
	// /**
	// * 锟斤拷锟斤拷锟叫憋拷
	// */
	// public static final int INTENT_FRAGMENT_CITYLIST = 7;
	/**
	 * 锟斤拷锟斤拷锟秸藏凤拷锟斤拷
	 */
	public static final int REQCODE_COLLECT = 1;

	public static final int REQCODE_NETWORK_SETTING = 2;
	/**
	 * 锟斤拷取注锟斤拷锟斤拷 1 注锟斤拷 2 锟斤拷锟斤拷锟斤拷锟�
	 * */
	public static final String CAPTCHA_FLAG_REGISTER = "1";
	public static final String CAPTCHA_FLAG_RETRIEVE = "2";

	public static final String RESPONSE_OK = "OK";
	public static final String RESPONSE_NG = "NG";
	public static final String GET_STATUS_SCEECSS = "success";

	/**
	 * 3DES 锟斤拷锟斤拷
	 * 
	 */
	public static final String TRIABLEDES_SECURATE_KEY = "b9de309f8c9491891f845845";
	public final static byte[] TRIBLEDES_SECURITY = TRIABLEDES_SECURATE_KEY
			.getBytes();

	/*
	 * 锟斤拷锟杰凤拷锟斤拷DESede锟斤拷示锟斤拷3des锟斤拷锟杰凤拷式
	 * 锟斤拷锟斤拷模式CBC,ECB锟斤拷锟斤拷CBC模式锟斤拷使锟斤拷key,锟斤拷锟斤拷iv;锟斤拷ECB模式锟铰斤拷使锟斤拷key锟斤拷
	 * 锟斤拷锟侥Ｊ絅oPadding锟斤拷PKCS5Padding锟斤拷SSL3Padding锟斤拷 锟斤拷锟斤拷之锟斤拷募锟斤拷荩锟�
	 * 一锟斤拷锟斤拷C#锟斤拷锟斤拷CBC Mode锟斤拷PKCS7 Padding,Java锟斤拷锟斤拷CBC Mode锟斤拷PKCS5Padding
	 * Padding, 锟斤拷一锟斤拷锟斤拷C#锟斤拷锟斤拷ECB Mode锟斤拷PKCS7 Padding,Java锟斤拷锟斤拷ECB
	 * Mode锟斤拷PKCS5Padding Padding,
	 */
	public final static String TRIABLE_DES_ALGORITHM = "desede/ECB/PKCS7Padding";

	/**
	 * user head portrait width height
	 */
	public final static int USR_HEAD_WIDTH = 60;
	public final static int USR_HEAD_HEIGHT = 60;

	/**
	 * history order status 0 complete 1 waiting for pay 2 cancle 3 part return
	 * 4 all return
	 */
	public final static String HISTORY_ORDER_STATUS_COMPLETE = "0";
	public final static String HISTORY_ORDER_STATUS_NO_PAY = "1";
	public final static String HISTORY_ORDER_STATUS_CANCLE = "2";
	public final static String HISTORY_ORDER_STATUS_PART_RETURN = "3";
	public final static String HISTORY_ORDER_STATUS_ALL_RETURN = "4";

	/**
	 * Login Fragment fired by which
	 */
	public final static String KEY_LOGIN_FRAG_FIRED_BY = "KEY_LOGIN_FRAG_FIRED_FROM";
	public final static String LOGIN_FROM_MYCARD = "MyCard";
	public static String LAST_VIEW_FROM_MAIN = "";

	/**
	 * Order submit parameter
	 */
	public final static String UNPAY_ORDER_PAY = "1";
	public final static String UNPAY_ORDER_CANCLE = "0";
	
	/**
	 * Request code for 2D barcode scanner.
	 */
	public final static String BARCODE_RESULT_SPLITOR = "###";
	
	/*
	 * Event type for get card list by store id 
	 */
	public final static int GET_CARD_LIST_BY_STORE_ID_START = 1000;
	public final static int GET_CARD_LIST_BY_STORE_ID_END = 2000;
	
	public static boolean IS_CARD_LIST_BY_STORE_ID = false;
	public static String STORE_ID_FOR_CARD_LIST = "0";
}
